package com.lu.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 系统审批日志
 * </p>
 *
 * @author currentCodeAuthor
 * @since 2022-08-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class SysApprovalLog extends Model<SysApprovalLog> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 审批配置表id
     */
    private Long approvalConfigId;

    /**
     * 审批配置表下一个id
     */
    private Long approvalConfigNextId;

    /**
     * 表名-类型
     */
    private String tableName;

    /**
     * table_name 对象id
     */
    private Long objId;

    /**
     * 申请状态(0未通过 1通过)
     */
    private Integer status;

    /**
     * 备注
     */
    private String description;

    /**
     * 审批人 审批时对应的角色
     */
    private String roleIds;

    /**
     * 审批人
     */
    private Long userId;

    /**
     * 0流程未结束
     * 1流程结束
     * @see com.lu.model.enums.YesOrNoEnum
     */
    private Integer end;

    /**
     * 审批时间
     */
    private LocalDateTime createTime;

    @TableField(exist = false)
    private com.lu.model.entity.SysUser user;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
